if(!dojo._hasResource["dojox.data.PlayListWriteStore"]){
dojo._hasResource["dojox.data.PlayListWriteStore"] = true;
dojo.provide("dojox.data.PlayListWriteStore");
dojo.experimental("dojox.widget.SortList"); // level: prototype, designed for dijit.chat.demo

dojo.require("dojo.data.ItemFileWriteStore");

dojo.declare("dojox.data.PlayListWriteStore", dojo.data.ItemFileWriteStore, {
	// summary: a Target object, which can be used as a DnD target
	
	playlist: "", 
	
	constructor: function(keywordParameters){
		// summary: a constructor of the PlayListWriteStore
		
		// step 1: set up a custom save function for PlayListWriteStore
		var saveCustom = function(saveCompleteCallback, saveFailedCallback) {
			// skeleton save operation
			// step 1: feed back to the server in json format representing the current data store
			var newFileContentString = this._getNewFileContentString();
			
			console.debug(newFileContentString);
			
			// step 2: make the post request to the server to submit all of the info
			dojo.xhrPost({
				url: 'savePlaylist.php',
				load: function(data) { console.debug(data); },
				error: function() { },
				content: {	username: 'temp',
							playlist: this.playlist,
							content: newFileContentString }
			});
			
			saveCompleteCallback();
		};
		
		this._saveCustom = saveCustom;
		
		
	}
});
}